package com.flot.yazb.model;

import com.flot.yazb.base.model.BModel;
import com.flot.yazb.base.client.RetrofitFactory;
import com.flot.yazb.aop.stub.RMCallback;
import com.flot.yazb.aop.stub.RMResponse;
import com.flot.yazb.retrofit.service.BService;

public class CommentModel extends BModel{
    public int id;

    public static void getComment( final Transit<CommentModel[]> incubator) {
        RetrofitFactory.getInstance()
                .create(BService.UserService.class)
                .getComent()
                .enqueue(new RMCallback<RMResponse<CommentModel[]>>(incubator.getContext()) {
                    @Override
                    protected void onSuccess(RMResponse<CommentModel[]> result) {
                        incubator.onBorn(result.content, result.code(), result.message());
                    }

                    @Override
                    protected void onFail(String errorCode, String errorInfo) {
                        incubator.onBorn(null, errorCode, errorInfo);
                    }
                });
    }

    public String headpic;
    public String rank;
    public String username;
    public String content;

}